<template>
    <div class='databox flex'>
        <img :src="img"
             alt="">

        <div class="content flex space-between">
            <slot></slot>
        </div>
    </div>
</template>

<script>
export default {
    props: {
        icon: {},
    },
    components: {},
    data() {
        return {}
    },
    computed: {
        img() {
            return require(`@/assets/img/home/${this.icon}-icon-2.png`)
        },
    },
    methods: {},
    created() {},
    mounted() {},
}
</script>
<style lang='less' scoped>
.databox {
    width: 400px;
    height: 40px;
    background: url(../assets/img/home/box-bg.png);
    margin-bottom: 6px;
    img {
        width: 42px;
        height: 40px;
        display: block;
    }
    .content {
        flex: 1;
        padding: 5px 5px 5px 0;
        .item {
            background-color: rgba(0, 170, 255, 0.08);
            padding: 0 8px;
            width: 100px;
            height: 30px;
            label {
                font-size: 14px;
                color: #aacef2;
            }
            .val {
                font-size: 16px;
                color: #33bbff;
            }
            .unit {
                font-size: 12px;
                color: #8fadcc;
                margin-left: 2px;
            }
            &.month {
                width: 148px;
            }
        }
    }
}
</style>